package com.yang.system.domain.orgMng.org;

import java.lang.ScopedValue;
import java.util.Optional;

public interface OrgRepository {
    Org save(Org org);
    Optional<Org> findByIdAndStatus(long tenantId, Long id,OrgStatus status);
    int countBySuperiorAndName(long tenantId, Long superiorId, String name);
    boolean existsBySuperiorAndName(Long tenant, Long superior, String name);

    ScopedValue<Object> findById(Long tenantId, Long id);

    void update(Org org);
}
